package com.wlcj.www.model.data;

import com.jfinal.plugin.activerecord.Model;
import com.wlcj.www.util.CacheKeyUtil;
import com.wlcj.www.util.RedisUtil;

public class Platform extends Model<Platform> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -617069672688693663L;
	
	public static final Platform dao = new Platform();
	
	public Platform getCachePlatformById(int id) {
		String key = CacheKeyUtil.getPlatformKey(id);
		Platform p = RedisUtil.get(key);
		if(p==null) {
			p = findById(id);
			RedisUtil.set(key, p);
		}
		return p;
	}

}
